package com.powervision.mvvmdemo.ui.repository

import com.powervision.http.base.BaseRepository
import com.powervision.http.entity.ApiResponse
import com.powervision.mvvmdemo.ui.http.RetrofitClient
import com.powervision.mvvmdemo.ui.model.SearchArticleModel

/**
 * @auth: njb
 * @date: 2021/12/20 14:15
 * @desc: 描述
 */
class SearchArticleRepository :BaseRepository(){
    private val mSearchArticleRepository by lazy {
        RetrofitClient.service
    }

    suspend fun searchArticle(page:Int,author:String):ApiResponse<List<SearchArticleModel>>{
        return executeHttp {
            mSearchArticleRepository.searchArticle(page,author= author)
        }
    }
}